onload = () => {
    loadCSS("../css/fontello.css", "bootstrap5-icon");
    loadCSS("../css/bootstrap5.min.css", "bootstrap5");
    loadScript("../js/bootstrap5.bundle.min.js")
        .then(() => loadScript("../js/crud.js")).then(() => {
        let carrierTemplateOperator = new Crud({
            module: "carrierTemplate",
            pk:"carrierApTemplateId",
            hasCheckbox: true,
            iterators: [],
            opsButton: ["new"],
            search: [{"caption": "Name", "type": "text", "name": "name", class: "col-3"},
                {"caption": "Code", "type": "text", "name": "code", class: "col-3"}
            ],
            listField: [{"caption": "ID", "field": "carrierApTemplateId"}, {"caption": "Name", "field": "name"}],
            editFields: [
                {caption:"name","name": "name", "required": "required"},
                {caption:"Sheet","name": "sheet", "required": "required"},
                {caption:"Bill #","name": "billNo",required: "required"},
                {caption:"Bill Date","name": "billDate"},
                {caption:"Date Format","name": "dateFormat"},
                {caption:"Tracking #",name:"trackingNo", "required": "required"},
                {caption:"Currency","name": "currency", "required": "required"},
                {caption:"Charge","name": "charge", "required": "required"},
                {caption:"Charge Value","name": "chargeValue"},
                {caption:"weight","name": "weight"},
                {caption:"Weight Unit","name": "weightUnit"},
                {caption:"Size","name": "size",placeholder:"Should three columns or none,split by comma"},
                {caption:"Size Unit","name": "sizeUnit"},
            ]
        });
        carrierTemplateOperator.init()
    }).catch((err) => console.error(err));
}
